package chapter6;
import java.util.Scanner;
/****************************************************************
 * Author：icynlau
 * Description: 对三个数排序
 * Date:2021/4/4
 * ***************************************************************
 */
public class exc6_5 {
	
	public static void displaySortedNumbers(
			double number1,double number2,double number3) {
		
		if(number1>number2) {
			double t=number1;
			number1=number2;
			number2=t;
		}
		
		if(number2>number3) {
			double t=number3;
			number3=number2;
			number2=t;
		}
		
		if(number1>number2) {
			double t=number1;
			number1=number2;
			number2=t;
		}
		
		System.out.print(number1+"  "+number2+"  "+number3);
		
	}
	
	public static void main(String[] args) {
		
		Scanner input=new Scanner(System.in);
		
		System.out.print("Enter three number:  ");
		double n1=input.nextDouble();
		double n2=input.nextDouble();
		double n3=input.nextDouble();
		
		displaySortedNumbers(n1,n2,n3);
		
		
		
		
	}

}
